﻿using System;

namespace AMing.Core.Extension
{
    public static class DateTimeExtension
    {
        /// <summary>
        /// MM-dd HH:mm
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public static string ToStringFromat(this DateTime datetime)
        {
            if (datetime != null)
            {
                return datetime.ToString("yyyy-MM-dd HH:mm");
            }
            return "";
        }
    }
}
